<?php /** // very important annotations
* @property CI_Loader $load
* @property CI_Form_validation $form_validation
* @property CI_Input $input
* @property CI_Email $email
* @property CI_DB_active_record $db
* @property CI_Session $session
* @property CI_Config $config
* @property CI_URI $uri
* @property CI_Upload $upload
* @property CI_Pagination pagination
*
*/
?>

	<style type="text/css" media="screen">
	#container {
	 width: 600px;
	 margin: auto;
	font-family: helvetica, arial;
	}

	table {
	 width: 600px;
	 margin-bottom: 10px;
	}

	td {
	 border-right: 1px solid #aaaaaa;
	/* padding: 1em; */
	}

	td:last-child {
	 border-right: none;
	}

	th {
	 text-align: left;
	 padding-left: 1em;
	 background: #cac9c9;
	border-bottom: 1px solid white;
	border-right: 1px solid #aaaaaa;
	}

	#pagination a, #pagination strong {
	 background: #e3e3e3;
	 padding: 4px 7px;
	 text-decoration: none;
	border: 1px solid #cac9c9;
	color: #292929;
	font-size: 13px;
	}

	#pagination strong, #pagination a:hover  {
	 font-weight: normal;
	 background: #cac9c9;
	}

        h1{
            color:white;
}
	</style>



    <div id="container">
		<h1>Friends I Added List</h1>



    <?php

    if(isset ($records) && $records->num_rows()>0  ){
                     echo "<div id='testinglinks'>" ;


                $i = 0; // incremental variable for search result numbering


                echo "<table id='links' border=\"2\">";


                echo "<tr>
                    <th> </th>
                    <th>First Name</th>
                    <th>Last Name</th>
                    <th>Friend Name</th>
                    <th>Situation Name</th>
                    <th>Situation ID</th>
             </tr>"  ;
                for ($i = 0 ; $i< $records->num_rows() ; $i++) { // foreach loop, to loop through each array value (result) as $res
                     // incrementation
              //      echo "<p>" . $i . ": <a href='" . "www.google.com" . "'>" . $res->name . "</a><br /><i>" . $res->description . "</i><br /><span style='font-size: 10pt;'>" . $res->id . "</span></p>"; // display everything

              $res = $records->row($i) ;


                echo "<tr>" ;



                echo "<td> <input type=\"button\" value=\"Delete\" onclick=\"deleteFriendPost('". $res->friendEmail ."','".$res->SituationID."') \"/>  </td>" ;


                echo "<td>" ;         echo $res->firstName ;            echo "</td>" ;
                echo "<td>" ;         echo $res->lastName ;            echo "</td>" ;
                echo "<td>" ;         echo $res->friendEmail ;            echo "</td>" ;

                //index.php/formSumbit/index/
                echo "<td>" ;  echo "<a href=\"".base_url()."View/friendView/". $res->SituationID ." \" >";         echo $res->name;    echo "</a>" ;  echo "</td>" ;
                echo "<td>" ;         echo $res->SituationID ;            echo "</td>" ;

                echo "</tr>" ;

               // echo "<tr>" ;                echo($res[$i]->name);   echo"</tr>" ;


                }



    //            echo "<p><i>1-15 of " . $WebResults['SearchResponse']['Web']['Total'] . " results</i></p>"; // total number of results found by Bing for the search query provided

                echo "</table>" ;
                echo  "</div>" ;
    }
    else
        {
        echo "<p style=\"font-style:italic  \">You Did Not Add Any Friends.. </p>";
        }


    ?>

    </div>




<div id="container">
		<h1>Friends Added Me List</h1>
    <?php
    // Friends Added Me List

   // print_r($records) ;

 if(isset ($records2) && $records2->num_rows()>0 ){
                     echo "<div id='testinglinks'>" ;


                $i = 0; // incremental variable for search result numbering


                echo "<table id='links' border=\"2\">";


                echo "<tr>
                    <th>First Name</th>
                    <th>Last Name</th>
                    <th>Friend Name</th>
                    <th>Situation Name</th>
                    <th>Situation ID</th>
             </tr>"  ;
                for ($i = 0 ; $i< $records2->num_rows() ; $i++) { // foreach loop, to loop through each array value (result) as $res
                     // incrementation
              //      echo "<p>" . $i . ": <a href='" . "www.google.com" . "'>" . $res->name . "</a><br /><i>" . $res->description . "</i><br /><span style='font-size: 10pt;'>" . $res->id . "</span></p>"; // display everything

              $res = $records2->row($i) ;


                echo "<tr>" ;





                echo "<td>" ;         echo $res->firstName ;            echo "</td>" ;
                echo "<td>" ;         echo $res->lastName ;            echo "</td>" ;
                echo "<td>" ;         echo $res->email ;            echo "</td>" ;

                echo "<td>" ;  echo "<a href=\"".base_url()."View/friendView/". $res->ID ." \" >";         echo $res->name;    echo "</a>" ;  echo "</td>" ;

                echo "<td>" ;         echo $res->ID ;            echo "</td>" ;

                echo "</tr>" ;

               // echo "<tr>" ;                echo($res[$i]->name);   echo"</tr>" ;


                }



    //            echo "<p><i>1-15 of " . $WebResults['SearchResponse']['Web']['Total'] . " results</i></p>"; // total number of results found by Bing for the search query provided

                echo "</table>" ;
                echo  "</div>" ;

 }
 else
     {
     echo "<p style=\"font-style:italic  \">Nobody Added You As Friend.. </p>" ;
     }

    ?>
  </div>




<script type="text/javascript" charset="utf-8">
	$('tr:odd').css('background', '#e3e3e3');
</script>
